home *** CD-ROM | disk | FTP | other *** search
- debug = 0;
- var movx = parseInt("320",10);
- var movy = parseInt("240",10);
- if(texts == null)
- {
- var texts = "This|is|Bar|Chart|";
- }
- if(vals == null)
- {
- var vals = "100|40|-20|140|";
- }
- if(c1 == null)
- {
- var c1 = parseInt("16711680",10);
- }
- else
- {
- c1 = parseInt(c1,16);
- }
- if(c2 == null)
- {
- var c2 = parseInt("65280",10);
- }
- else
- {
- c2 = parseInt(c2,16);
- }
- if(c3 == null)
- {
- var c3 = parseInt("255",10);
- }
- else
- {
- c3 = parseInt(c3,16);
- }
- if(bgc == null)
- {
- var bgc = parseInt("16777215",10);
- }
- else
- {
- bgc = parseInt(bgc,16);
- }
- if(tpause == null)
- {
- var tpause = parseInt("300",10);
- }
- else
- {
- tpause = parseInt(tpause,10);
- }
- if(ty == null)
- {
- var ty = parseInt("20",10);
- }
- else
- {
- ty = parseInt(ty,10);
- }
- if(by == null)
- {
- var by = parseInt("20",10);
- }
- else
- {
- by = parseInt(by,10);
- }
- if(lx == null)
- {
- var lx = parseInt("20",10);
- }
- else
- {
- lx = parseInt(lx,10);
- }
- if(rx == null)
- {
- var rx = parseInt("20",10);
- }
- else
- {
- rx = parseInt(rx,10);
- }
- var target = "";
- var sbg = parseInt("0",10);
- var lm = " |";
- var lmxy = " |";
- ii = 0;
- if(0 < sbg)
- {
- moviearea.bgrholder.attachMovie("plain_bgr","pbg",0);
- setProperty("moviearea.bgrholder.pbg", _X, 0);
- setProperty("moviearea.bgrholder.pbg", _Y, 0);
- setProperty("moviearea.bgrholder.pbg", _width, movx);
- setProperty("moviearea.bgrholder.pbg", _height, movy);
- mc = new Color("moviearea.bgrholder.pbg");
- mc.setRGB(bgc);
- }
- moviearea._x = 0;
- moviearea.bimage._width = movx;
- moviearea._y = 0;
- moviearea.bimage._height = movy;
- var texts = texts.split("|");
- var vals = vals.split("|");
- tpause = int(tpause * 12 / 100);
- mp = 0;
- t2 = tpause / 2;
- attachMovie("click","click",0);
- setProperty("click", _X, 0);
- setProperty("click", _Y, 0);
- setProperty("click", _width, movx);
- setProperty("click", _height, movy);
- var lm = lm.split("|");
- var lmxy = lmxy.split("|");
- i = 0;
- while(i < lm.length)
- {
- if(3 < lm[i].length)
- {
- attachMovie("lom","lm" add i,i + 1);
- var xy = lmxy[i].split(",");
- setProperty("lm" add i, _X, xy[0]);
- setProperty("lm" add i, _Y, xy[1]);
- eval("lm" add i).loadMovie(lm[i]);
- }
- i++;
- }
- p100 = 0;
- min = 9999999;
- max = -9999999;
- i = 0;
- while(i < texts.length)
- {
- if(texts[i] ne "")
- {
- vals[i] = Number(vals[i]);
- attachMovie("shape","t" add i,(i + 1) * 3 + lm.length);
- setProperty("t" add i, _visible, false);
- attachMovie("grr",i,i * 3 + 1 + lm.length);
- setProperty(i, _visible, false);
- mc = new Color("t" add i);
- mc.setRGB(c1);
- set("t" add i add ".text.text",texts[i] add " (" add vals[i] add ")");
- if(max < vals[i])
- {
- max = vals[i];
- }
- if(vals[i] < min)
- {
- min = vals[i];
- }
- ii++;
- }
- i++;
- }
- if(max >= 0)
- {
- p100 = max;
- }
- else
- {
- p100 = 0;
- }
- if(0 < min)
- {
- min = 0;
- }
- if(min < 0)
- {
- p100 += Math.abs(min);
- }
- th = getProperty("t0", _height);
- wi = int(movx - lx - rx);
- hi = int(movy - ty - by);
- ww = wi / ii;
- var r1 = c2 >> 16 & 0xFF;
- var g1 = c2 >> 8 & 0xFF;
- var b1 = c2 & 0xFF;
- var r2 = c3 >> 16 & 0xFF;
- var g2 = c3 >> 8 & 0xFF;
- var b2 = c3 & 0xFF;
- i = 0;
- while(i < ii)
- {
- alpha = i * 100 / (ii - 1);
- var mix = (Math.floor(r1 * alpha / 100) + Math.floor(r2 * (100 - alpha) / 100) << 16) + (Math.floor(g1 * alpha / 100) + Math.floor(g2 * (100 - alpha) / 100) << 8) + (Math.floor(b1 * alpha / 100) + Math.floor(b2 * (100 - alpha) / 100));
- mc = new Color(i);
- mc.setRGB(mix);
- i++;
- }
- mode = 0;
- var today = new Date();
- if(!(today.getTime() < ts && ts < today.getTime() + 172800000 || ts == -1 || 0 < debug))
- {
- gotoAndStop("ea");
- }
-